package com.lz.gmall.search.domain;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

// 封装文档数据
@Data
@Document(indexName = "inb-no1")
public class Person {
    @Id
    private Long id;
    @Field(name = "username",analyzer = "ik_max_word",type = FieldType.Text)
    private String username;
    @Field(name = "address",analyzer = "ik_max_word",type = FieldType.Text)
    private String address;
    @Field(name = "age",type = FieldType.Integer)
    private Integer age;

}